<?php

  /**
   * @package JooS
   */
  require_once "JooS/Stream/Entity/Interface.php";
  
  abstract class JooS_Stream_Entity_Abstract implements JooS_Stream_Entity_Interface {
    /**
     * @var string
     */
    private $_path;
    
    /**
     * @param string $path
     */
    protected function __construct($path) {
      $this->_setPath($path);
    }

    /**
     * @return string
     */
    final public function basename() {
      return basename($this->path());
    }

    /**
     * @return string
     */
    final public function dirname() {
      return dirname($this->path());
    }

    /**
     * @return string
     */
    final public function path() {
      return $this->_path;
    }
        
    /**
     * @param string $path 
     */
    protected function _setPath($path) {
      $this->_path = $path;
    }
  }
